Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Jan 19, 2026

The llext stuff is still missing, but I had to go to sleep.

Anyway the conversion is ready AFAICT. The llext stuff can be added in separate PR.

Jyri Sarha added 2 commits January 20, 2026 00:18
Zephyr and broken pass through configuration fixes.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
There is for no apparent reason a blob handler pointer model_handler
in component data, remove it and remove select COMP_BLOB from Kconfig.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Copilot AI review requested due to automatic review settings January 19, 2026 23:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converts the smart_amp component from the legacy component driver model to the new module adapter framework, removing dependencies on component-specific APIs and updating to use processing_module infrastructure.

Changes:

  • Replaced component driver interface with module adapter interface
  • Updated memory allocation from legacy rballoc/rfree to module API mod_alloc/mod_free
  • Migrated IPC command handlers to new configuration APIs (set_configuration/get_configuration)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/audio/smart_amp/smart_amp.c Main conversion to module adapter interface, replacing component driver functions with module interface implementations
src/audio/smart_amp/smart_amp_passthru.c Added LOG_MODULE_DECLARE and removed unused sof/bit.h include
src/audio/smart_amp/smart_amp_maxim_dsm.c Added LOG_MODULE_DECLARE for logging integration
src/audio/smart_amp/Kconfig Removed COMP_BLOB dependency no longer needed with module adapter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Jyri Sarha added 3 commits January 20, 2026 16:11
NOTE: This change has not been tested in any functional setup

For smart_amp to remain compatible with developing SOF it has to be
converted to use module API. The component API as such does not allow
llext loading or user-space usage. However, its unlikely the module
will work out of the box after this change, but in any case this
should make it easier to take smart_amp again into use.

This patch converts this component to module adapter API.
  - New() becomes simpler init()
  - Params() is handled in module adapter, in init()
    "mod->verify_params_flags = BUFF_PARAMS_CHANNELS;" replaces
     smart_amp_verify_params()
  - Channels check in params() is placed to separate function
    smart_amp_ipc4_params() to be called from prepare()
  - cmd() handler is changed to module adapter client style with
    smart_amp_set_configuration() and smart_amp_get_configuration().
  - smart_amp_copy() becomes module API smart_amp_process() function
  - smart_amo_prepare() picks sources and sink and does other
    preparations for processing
  - smart_amp_trigger() does the same thing as before, zeroes feedback
    buffer at playback start
  - Preliminary IPC4 support added

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Replace all rbmalloc() and rfree() usage with mod_alloc() and mod_free().

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Fix a simple typo inherited from the component version.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha jsarha force-pushed the smart_amp_to_module branch from bd043d5 to 22b7368 Compare January 20, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant